home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel0_89.lha / Feel / Src / allocate.h < prev    next >
C/C++ Source or Header  |  1993-06-13  |  3KB  |  86 lines

  1. /* ******************************************************************** */
  2. /*  allocate.h       Copyright (C) Codemist and University of Bath 1989 */
  3. /*                                                                      */
  4. /* Space allocation                                            */
  5. /* ******************************************************************** */
  6.  
  7. /*
  8.  * $Id: allocate.h,v 1.6 1992/11/25 16:39:35 pab Exp $
  9.  *
  10.  * $Log: allocate.h,v $
  11.  * Revision 1.6  1992/11/25  16:39:35  pab
  12.  * Added static chars
  13.  *
  14.  * Revision 1.5  1992/06/09  13:47:32  pab
  15.  * fixed includes
  16.  *
  17.  * Revision 1.4  1992/05/28  11:18:38  pab
  18.  * more defines
  19.  *
  20.  * Revision 1.5  1992/02/10  12:13:38  pab
  21.  * removed redundant code
  22.  *
  23.  * Revision 1.4  1992/01/17  22:27:39  pab
  24.  * Added alloc_nconses
  25.  *
  26.  * Revision 1.2  1991/09/11  12:06:58  pab
  27.  * 11/9/91 First Alpha release of modified system
  28.  *
  29.  * Revision 1.1  1991/08/12  16:49:23  pab
  30.  * Initial revision
  31.  *
  32.  * Revision 1.5  1991/02/14  02:13:54  kjp
  33.  * Redid header.
  34.  *
  35.  */
  36.  
  37. #define ALIGN_SIZE(s) \
  38.          ((s)+((s)%BYTE_ALIGNMENT == 0 \
  39.            ? 0 \
  40.            : BYTE_ALIGNMENT-(s)%BYTE_ALIGNMENT))
  41.  
  42. extern int pagesize;
  43. /* A sick method to catch GC bugs... */
  44. #define HUNK_PAGE_SIZE() 512
  45. /** (pagesize= (pagesize+64)%1221 + 1) **/
  46. /* Allocator function signatures... */
  47.  
  48. extern LispObject allocate_module_function(LispObject*,LispObject,LispObject,
  49.                     LispObject (*)(LispObject*),int);
  50. extern LispObject allocate_i_module(LispObject*,LispObject);
  51. extern LispObject allocate_i_function(LispObject*,LispObject,LispObject,int);
  52. extern LispObject allocate_buffered_continue(void);
  53. extern LispObject allocate_special(LispObject*,LispObject,LispObject (*)());
  54. extern LispObject allocate_generic(LispObject,int);
  55.  
  56. extern LispObject allocate_semaphore(LispObject*);
  57. extern LispObject allocate_thread(LispObject*,int,int, int);
  58. extern LispObject allocate_n_conses(LispObject *, int);
  59.  
  60. #if (defined(WITH_BSD_SOCKETS) || defined(WITH_SYSTEMV_SOCKETS))
  61.  
  62. extern LispObject allocate_listener(LispObject*);
  63. extern LispObject allocate_socket(LispObject*);
  64.  
  65. #endif
  66.  
  67. extern LispObject allocate_c_object(LispObject*, int,int);
  68.  
  69. /* Initialiser... */
  70.  
  71. extern void runtime_initialise_allocator(LispObject*);
  72. extern void runtime_reset_allocator(LispObject *);
  73.  
  74. extern char *allocate_page(LispObject*,int);
  75. extern void deallocate_page(LispObject*,char *,int);
  76.  
  77. extern char *allocate_space(LispObject*,int);
  78. extern void deallocate_space(LispObject*,char *,int);
  79. extern void promote_free_space(LispObject*);
  80.  
  81. extern char *allocate_stack(LispObject*,int);
  82. extern void free_stack(LispObject*,char *,int);
  83.  
  84. extern void allocate_static_integers(LispObject*);
  85. extern void allocate_static_chars(LispObject *);
  86.